<h3><%= @report.class::NAME %></h3>

<table>
    <thead>
        <tr>
            <th class='rank'>Rank</th>
            <% @report.class::COLS.each do |col, label| -%>
                <th class='<%= col %>'><%= label %></th>
            <% end -%>
        </tr>
    </thead>
    <tbody>
        <% i = 0 %>
        <% @report.data.each do |row| -%>
            <tr>
                <th class='rank'><%= i += 1 %></td>
                <% @report.class::COLS.each do |col, label| -%>   
                    <td class='<%= col %>'><%= col == 'percent' ? 
                            number_to_percentage(row[col], :precision => 1) : 
                            row[col] %></td>
                <% end -%>
            </tr>
          <% end -%>
    </tbody>
</table>